interface Compute{
    int compute(int n,int m);
}

class Addition implements Compute{
    @Override
    public int compute(int n,int m){
        return n+m;
    }
}

class Subtraction implements Compute{
    @Override
    public int compute(int n,int m){
        return n-m;
    }
}

class Multiplication implements Compute{
    @Override
    public int compute(int n,int m){
        return n*m;
    }
}

class Division implements Compute{
    @Override
    public int compute(int n,int m){
        return n/m;
    }
}
class UseCompute{
    public void useCom(Compute com,int one,int two){
        int result=com.compute(one,two);
        System.out.println("运算结果为："+result);
    }
}

public class CalculatorTest {
    public static void main(String[] args) {
        UseCompute useCompute=new UseCompute();

        System.out.print("加法");
        useCompute.useCom(new Addition(),10,5);

        System.out.print("减法：");
        useCompute.useCom(new Subtraction(),10,5);

        System.out.print("乘法：");
        useCompute.useCom(new Multiplication(),10,5);

        System.out.print("除法：");
        useCompute.useCom(new Division(),10,5);

    }
}
